package br.com.obardavez.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

import org.codehaus.jackson.annotate.JsonIgnoreProperties;

import br.com.obardavez.base.entity.BaseEntity;

@JsonIgnoreProperties({"hibernateLazyInitializer", "handler"})
@Entity
@Table(name = "HISTORIA", schema = "OBARDAVEZ")
@XmlRootElement
public class Historia implements BaseEntity {
	
	private static final long serialVersionUID = 1L;

	private Long id;
	
	private String nome;
	
	private String email;
	
	private String apelido;
	
	private String local;
	
	private String historia;
	
	private Boolean moderado;
	
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name = "ID")
	@XmlElement
	public Long getId() {
		return id;
	}

	@Column(name = "NOME")
	@XmlElement
	public String getNome() {
		return nome;
	}

	@Column(name = "EMAIL")
	@XmlElement
	public String getEmail() {
		return email;
	}

	@Column(name = "APELIDO")
	@XmlElement
	public String getApelido() {
		return apelido;
	}
	
	@Column(name = "LOCAL")
	@XmlElement
	public String getLocal() {
		return local;
	}

	@Column(name = "HISTORIA")
	@XmlElement
	public String getHistoria() {
		return historia;
	}

	@Column(name = "MODERADO")
	@XmlElement
	public Boolean getModerado() {
		if(moderado  == null){
			moderado = Boolean.FALSE;
		}
		return moderado;
	}
	
	public void setId(Long id) {
		this.id = id;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public void setApelido(String apelido) {
		this.apelido = apelido;
	}
	
	public void setLocal(String local) {
		this.local = local;
	}

	public void setHistoria(String historia) {
		this.historia = historia;
	}

	public void setModerado(Boolean moderado) {
		this.moderado = moderado;
	}

	
	
	
	
	

}
